/**
 * @Project Name:studio-elasticsearch
 * @Package Name:cn.hoofungson.studio.elasticsearch.model.article
 * @Since JDK 1.8
 */

package com.leimingtech.studio.elasticsearch.model.article;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

/**
 * @Description: ArticleDocument
 * @Author 胡松 hoofungson@163.com
 * @Date 2019-11-05 18:07
 * @Version V1.0
 */
@Data
@Document(indexName = "my-application", type = "article")
public class ArticleDocument {

    @Id
    @Field(name = "id")
    private Long id;

    @Field(name = "title",type = FieldType.Text)
    private String title;

    @Field(name = "short_title",type = FieldType.Text)
    private String shortTitle;

    @Field(name = "author",type = FieldType.Text)
    private String author;

    @Field(name = "html_content",type = FieldType.Text)
    private String htmlContent;

    @Field(name = "create_time",type = FieldType.Date)
    private Date createTime;

    @Field(name = "update_time",type = FieldType.Date)
    private Date updateTime;
}
